interface IBaseExtends {
  /**
   * 获取当前时间戳
   * @returns {number}
   */
  getTimeStamp(): number;
}


interface User {
    name: string
    sex: 0 | 1
    age: number
}

interface Action extends IBaseExtends, User {
    speek:(word: string) => string
}


export class BaseExtends implements Action {

    name: string = 'base'
    sex: 0 | 1;
    age: number
    constructor({name, sex, age}: User){
        this.name = name
        this.sex = sex
        this.age = age
    }
    public getTimeStamp(): number {
        return Date.now()
    }

    private _speek(word: string): string {
        return `${this.name}`
    }
     speek(word: string): string {
        return `${this.name}, ${this.age}, ${this.sex} , ${word}`
    }
}

